package cc.magicjson.jpa.datasouce.rest;


import cc.magicjson.jpa.datasouce.bo.RemoteUserBo;
import cc.magicjson.jpa.datasouce.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;

@RestController("mapUserController")
@RequestMapping("/map/users")
public class UserController {

    @Autowired
    @Qualifier("mapUserService")
    private UserService userService;

    @PostMapping("/create")
    public String createUser(@RequestBody RemoteUserBo remoteUserBo) {
        userService.createUser(remoteUserBo);
        return "User created successfully!";
    }
}
